using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Configuration;
using Castle.ActiveRecord;
using Castle.ActiveRecord.Framework.Config;
using System.Data;

namespace Saffron.Tests
{

    public class NHibernateTestFixtureBase
    {
        
        /// <summary>
        /// Initialize NHibernate and builds a session factory
        /// Note, this is a costly call so it will be executed only one.
        /// </summary>
        public static void OneTimeInitalize(params Type[] recordTypes)
        {
            try
            {
                ActiveRecordStarter.Initialize(ActiveRecordSectionHandler.Instance,
                                                recordTypes);
                ActiveRecordStarter.CreateSchema();
            }
            catch (Exception exc)
            {
                Console.WriteLine("Error initializing test database:");
                Console.WriteLine(exc.ToString());
            }
        }

        
    } 
}
